<?php


namespace App\controller;


class ReturnMsg
{
    /**
     * msg
     * @param int $code
     * @param string $msg
     * @return false|string
     * date:2021/12/22
     * time:15:21
     * auth：xyc
     */
    public static function msg(int $code, string $msg, array $data = [])
    {
        return json_encode([
            'code' => $code,
            'msg' => $msg,
            'data' => $data
        ]);
    }
}